import React, {useEffect, useState} from 'react';
import BaseChart from '@/echarts/baseChart';
import MapChart from '@/echarts/mapChart';
import {request} from "dw-mx-request";
import {BigScreenCanvas} from "@/BigScreenCanvas";
import {ColFlex, FlexItem, RowFlex} from "dw-mx-flex";

export default function Export(props){
    // 接口数据
    const [jsona,setJsona] = useState();

    // useEffect(()=>{
    //     //发送请求,设置请求数据
    //     const getData = async()=>{
    //         const result = await request('/mx/test/getData');
    //         if(result){
    //             setJsona(result);
    //         }
    //     };
    //
    //     // 假设10秒发一次请求
    //     getData();
    //     const jsonaInterval = setInterval(()=>{
    //         getData();
    //     },10000);
    //
    //     // 组件销毁时调用,比如F5,或者页面关闭
    //     return ()=>{
    //         // 组件销毁时清除定时器
    //         clearInterval(jsonaInterval);
    //     }
    // },[]);
    //
    // const test = () =>{alert(1);};

    return (
        <BigScreenCanvas designWidth={'1920px'} designHeight={'1080px'} bgpic={'pic1'}>
            <div id="normalcharts_1611813487466" style={{width: "300px",height: "300px",left: 190,
                top: 17}}>
                <BaseChart option={{"xAxis":{"type":"category","data":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},"yAxis":{"type":"value"},"series":[{"data":[120,200,150,80,70,110,130],"type":"bar"}]}} width={'300px'} height={'300px'}/>
            </div>
            <div id={'reacteditor_1611809957377'} style={{position:'absolute',width:'50px', height:'50px',overflow:'auto',border: "1px solid #000",left:562,top:18}}>
                <div>423</div>
            </div>
        </BigScreenCanvas>
    );
}